#!/bin/bash

PREFIX="/home/wangxu/public_html"

wget -q http://proxy.ipcn.org/proxylist.html -O - |grep "^[0-9]" | \
${PREFIX}/tp.pl "news.google.com" $PREFIX/ext.list | sort -n | \
cut -f2 |uniq > ${PREFIX}/sorted-proxy.list

if [ -s ${PREFIX}/sorted-proxy.list ]
then
    ${PREFIX}/gap.pl ${PREFIX}/freeip.list \
    ${PREFIX}/sorted-proxy.list > ${PREFIX}/autoproxy.pac
fi

